using System;
using System.Numerics;

namespace NodeBasedSkillEditor.Model.Node
{
    [Node(Category = DAGHelper.CateName_Math, Name = "Random ±")]
    [NodeTypeGroup(TypeGroupId = 1, AllowedTypes = new Type[] { typeof(bool), typeof(int), typeof(float), typeof(Vector2), typeof(Vector3) })]
    public class Node_Random : NodeData
    {
        [Port(IOType = EPortIOType.Input)]
        public EnumPort<ERandDistribution> Distribution = new EnumPort<ERandDistribution>(ERandDistribution.Uniform);

        [Port(IOType = EPortIOType.Input)]
        public EnumPort<EVaryMode> VaryMode = new EnumPort<EVaryMode>(EVaryMode.TimeVary);

        [Port(IOType = EPortIOType.Input)]
        public BooleanPort AutoSeed = new BooleanPort(true);

        [Port(IOType = EPortIOType.Input)]
        public IntegerPort Seed = new IntegerPort(12345);

        [Port(IOType = EPortIOType.Input)]
        public IntegerPort Index = new IntegerPort();

        [Port(IOType = EPortIOType.Input, TypeGroup = 1)]
        public ValuePort Mean = new ValuePort();

        [Port(IOType = EPortIOType.Input, TypeGroup = 1)]
        public ValuePort Variance = new ValuePort();

        [Port(IOType = EPortIOType.Output, TypeGroup = 1)]
        public ValuePort Result = new ValuePort();

        public override RT_Node BuildRuntimeNode(RT_DAG parentDAG)
        {
            return new RT.Node_Random_RT(this, parentDAG);
        }
    }
}
